{template 'web/common/common'}
{template 'web/home/navbar'}
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/style.css" />
<link rel="stylesheet" type="text/css" href="../addons/{php echo $_GPC['m']}/resource/swal/dist/sweetalert2.min.css" />
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/layui.css" />
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/new-common.css" />
<style>
    .layui-form-label{width: 190px;}
</style>
<blockquote class="layui-elem-quote layui-text">
    个人中心设置
</blockquote>
<form class="layui-form" action="{url 'site/entry/home',array('m'=>'kundian_farm','op'=>'center_set_save','version_id'=>$_GPC['version_id'])}" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（我的地块）</label>
        <div class="layui-input-block">
            {if $list['hide_center_land']==1}
            <input type="checkbox" checked name="hide_center_land" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_land" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（我的畜牧）</label>
        <div class="layui-input-block">
            {if $list['hide_center_animal']==1}
            <input type="checkbox" checked name="hide_center_animal" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_animal" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（积分商城）</label>
        <div class="layui-input-block">
            {if $list['hide_center_integral']==1}
            <input type="checkbox" checked name="hide_center_integral" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_integral" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（组团商城）</label>
        <div class="layui-input-block">
            {if $list['hide_center_group']==1}
            <input type="checkbox" checked name="hide_center_group" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_group" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（组团订单）</label>
        <div class="layui-input-block">
            {if $list['hide_center_group_order']==1}
            <input type="checkbox" checked name="hide_center_group_order" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_group_order" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（我的优惠券）</label>
        <div class="layui-input-block">
            {if $list['hide_center_coupon']==1}
            <input type="checkbox" checked name="hide_center_coupon" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_coupon" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（兑换卡）</label>
        <div class="layui-input-block">
            {if $list['hide_center_card']==1}
            <input type="checkbox" checked name="hide_center_card" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_card" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（购物车）</label>
        <div class="layui-input-block">
            {if $list['hide_center_cart']==1}
            <input type="checkbox" checked name="hide_center_cart" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_cart" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（收货地址）</label>
        <div class="layui-input-block">
            {if $list['hide_center_address']==1}
            <input type="checkbox" checked name="hide_center_address" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_address" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否隐藏（常见问题）</label>
        <div class="layui-input-block">
            {if $list['hide_center_issue']==1}
            <input type="checkbox" checked name="hide_center_issue" value="1" lay-skin="switch" lay-text="ON|OFF">
            {else}
            <input type="checkbox" name="hide_center_issue" value="1" lay-skin="switch" lay-text="ON|OFF">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">个人中心联系客服</label>
        <div class="layui-input-block">
            {if $list['center_contact_type']==1}
            <input type="radio" name="center_contact_type" value="1" title="客服" checked="">
            <input type="radio" name="center_contact_type" value="2" title="电话">
            {else}
            <input type="radio" name="center_contact_type" value="1" title="客服" >
            <input type="radio" name="center_contact_type" value="2" title="电话" checked="">
            {/if}
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">保存</button>
        </div>
    </div>
</form>



<!--<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/style.css" />-->
<!--<div class="panel panel-success">-->
    <!--<div class="panel-heading">-->
        <!--<h3 class="panel-title">-->
            <!--个人中心设置-->
        <!--</h3>-->
    <!--</div>-->
    <!--<div class="panel-body">-->
        <!--<form id="sign-form" class="form-horizontal" role="form" method="post" action="{url 'site/entry/home',array('m'=>'kundian_farm','op'=>'center_set_save','version_id'=>$_GPC['version_id'])}" name="submit" style="padding: 20px 0;">-->

            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（我的地块）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_land']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_land">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_land" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（我的畜牧）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_animal']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_animal">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_animal" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（积分商城）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_integral']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_integral">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_integral" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（组团商城）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_group']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_group">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_group" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（组团订单）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_group_order']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_group_order">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_group_order" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（我的优惠券）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_coupon']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_coupon">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_coupon" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（兑换卡）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_card']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_card">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_card" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（购物车）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_cart']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_cart">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_cart" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（收货地址）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_address']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_address">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_address" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">是否隐藏（常见问题）</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!--{if $list['hide_center_issue']==1}-->
                        <!--<input type="checkbox" checked class="js-switch" value="1" name="hide_center_issue">-->
                        <!--{else}-->
                        <!--<input type="checkbox" class="js-switch" name="hide_center_issue" value="1">-->
                        <!--{/if}-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="form-group">-->
                <!--<label  class="col-sm-2 control-label">联系客服</label>-->
                <!--<div class="col-sm-8">-->
                    <!--<div class="col-sm-8">-->
                        <!---->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->

            <!--<div class="form-group">-->
                <!--<div class="col-sm-offset-2 col-sm-10">-->
                    <!--<button type="submit" class="btn btn-primary">保存</button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</form>-->
    <!--</div>-->
<!--</div>-->
<script src="../addons/kundian_farm/resource/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
                ,layer = layui.layer
                ,layedit = layui.layedit
                ,laydate = layui.laydate;
        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });



    });
</script>